package org.lboot.flow.event.system;


import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.lboot.flow.module.work.FlowWork;
import org.lboot.flow.module.work.params.FlowTaskParams;
import org.springframework.context.ApplicationEvent;

import java.time.Clock;

/**
 * @author kindear
 * 流程状态迁移 进行中 -> 阻塞
 */
@Slf4j
@Getter
public class FlowBlockEvent extends ApplicationEvent {
    FlowWork flowWork;

    // 可以为空
    @Deprecated
    FlowTaskParams taskParams;

    public FlowBlockEvent(Object source, FlowWork flowWork, FlowTaskParams taskParams) {
        super(source);
        this.flowWork = flowWork;
        this.taskParams = taskParams;
    }

    public FlowBlockEvent(Object source, FlowWork flowWork) {
        super(source);
        this.flowWork = flowWork;
    }

    public FlowBlockEvent(Object source, Clock clock) {
        super(source, clock);
    }
}

